<template>
  <div class="hello">
    <!--<div id="my_camera" style="width:320px; height:240px;"></div>-->
    <!--<div id="my_result"></div>-->
  <!--<p></p>-->
    <!--<p></p>-->
    <!--<p></p>-->
    <!--<div v-on:click="take_snapshot">点击调用摄像头</div>-->
    <div v-on:click="getIDCard()">获取身份证</div>
  </div>
</template>

<script>
  // import Webcam from '../until/webcam'
  import startFun from '../until/js/idcard'
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  methods: {
    // take_snapshot() {
    //   console.log('他妈的');
    //   Webcam.snap( function(data_uri) {
    //     console.log(data_uri)
    //     document.getElementById('my_result').innerHTML = '<img src="'+data_uri+'"/>';
    //   } );
    // },
    getIDCard(){
        console.log('获取身份证');
        // device.startFun()
      startFun()
    }
  },
  mounted() {
    // Webcam.attach( '#my_camera' );
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
